#ifndef NANE_D3D9INDEXBUFFER_H
#   define NANE_D3D9INDEXBUFFER_H

#   include "nane/RenderSystem/IRenderSystem.h"
#   include <d3d9.h>

namespace nane
{
    class D3D9IndexBuffer
        : public IIndexBuffer
    {
    public:
        D3D9IndexBuffer( IDirect3DIndexBuffer9* _pIB9, uint32 _indiciesNum );
        ~D3D9IndexBuffer();

        IDirect3DIndexBuffer9* GetInterface();
        uint32 GetIndicesNum() const;

    public:
        uint16* Lock( uint32 _offset, uint32 _size );
        void Unlock();

    private:
        IDirect3DIndexBuffer9* m_pIB9;
        uint32 m_indiciesNum;
    };

}

#endif	// NANE_D3D9INDEXBUFFER_H
